<template>
	<view class="pop-order-remark">
		<u-popup ref="product_poster_pop" bgColor="#ffffff" :show="show_pop" :safeAreaInsetBottom="false" mode="center" :closeOnClickOverlay="true"
			round="30" @close="onClose" @open="onOpen">
			<view class="poster-modal-wrap">
				<view class="poster-modal-inner">
					<view class="modal-ctx">
						<view class="poster-box">
							<image :src="info.thumb" mode="aspectFill"></image>
						</view>
						<view class="info-box flex-between">
							<view class="title-box">
								<view class="title">
									{{info.title}}
								</view>
								<view class="price-info ">
									<text class="huobi">￥</text>
									<text class="price">{{info.priceSale}}</text>
								</view>
							</view>
							<view class="brand-box">
								<image :src="vuex_config.comLogo" mode="aspectFill"></image>
							</view>
						</view>
					</view>
				</view>
			</view>
		</u-popup>


		<u-popup ref="product_action_pop" bgColor="#ffffff" :show="show_pop" mode="bottom" :closeOnClickOverlay="true"
			round="30" @close="onClose" @open="onOpen">
			<view class="info-modal-wrap">
				<view class="info-modal-inner">

					<view class="modal-ctx">
						<view class="act-list flex-between">
							<view class="act-item" @click="toShare()">
								<view class="icon-box">
									<image src="@/static/product/download.png" mode=""></image>
								</view>
								<view class="title">
									保存图片
								</view>
							</view>
							<button type="default" class="act-item" open-type="share">
								<view class="icon-box">
									<image src="@/static/common/weixin.png" mode=""></image>
								</view>
								<view class="title">
									微信
								</view>
							</button>
						</view>
					</view>
					<view class="modal-foot">
						<view class="footer-wrap ">
							<view class="btns">
								<view class="btn  flex-center" @click="doConfirm()">
									取消
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				show_pop: false,
				info: {}
			}
		},
		computed: {

		},
		watch: {

		},
		methods: {
			init(info) {
				this.info = info || {}
				this.show_pop = true;
			},
			onClose() {
				this.show_pop = false;
			},
			onOpen() {

			},
			doClose() {
				this.show_pop = false;
			},

			toShare() {
				this.toRoute({
					path: '/product-poster',
					query: {
						id: this.info.inventoryId
					}
				})
			},

			doConfirm() {
				this.show_pop = false;
				// this.$emit('confirm', this.content)
				// this.show_pop = false;
			},
		},
	}
</script>

<style lang="scss" scoped>
	.poster-modal-wrap {
		width: 686rpx;
		position: relative;
		text-align: left;
		padding-bottom: 0;
		// padding-bottom: calc(64rpx + constant(safe-area-inset-bottom));
		// padding-bottom: calc(64rpx + env(safe-area-inset-bottom));

		.poster-modal-inner {
			border-radius: 16rpx;
			overflow: hidden;
			width: 100%;
			padding: 0 0;
			padding-bottom: 0;
			min-height: 100rpx;
			background: #FFFFFF;


			.modal-ctx {
				.poster-box {
					margin: 0 auto;
					width: 518rpx;
					height: 518rpx;

					image {
						width: 518rpx;
						height: 518rpx;
					}
				}

				.info-box {
					margin-top: 100rpx;

					.title-box {
						flex: 1;
						overflow: hidden;

						.title {
							font-family: PingFang SC, PingFang SC;
							font-weight: bold;
							font-size: 28rpx;
							color: #000000;
						}

						.price-info {
							margin-top: 6rpx;

							.huobi {
								font-family: PingFang SC, PingFang SC;
								font-weight: bold;
								font-size: 24rpx;
								color: #000000;
							}

							.price {
								font-family: PingFang SC, PingFang SC;
								font-weight: bold;
								font-size: 32rpx;
								color: #000000;
							}
						}
					}

					.brand-box {
						margin-left: 30rpx;
						width: 90rpx;
						text-align: right;

						image {
							width: 90rpx;
							height: 90rpx;
						}
					}
				}
			}
		}
	}








	.pop-order-remark {
		position: relative;
		z-index: 1000;
	}


	.info-modal-wrap {
		width: 100%;
		position: relative;
		text-align: left;
		padding-bottom: 0;
		// padding-bottom: calc(64rpx + constant(safe-area-inset-bottom));
		// padding-bottom: calc(64rpx + env(safe-area-inset-bottom));

		.info-modal-inner {
			border-radius: 16rpx;
			overflow: hidden;
			width: 100%;
			padding: 0 0;
			padding-bottom: 0;
			min-height: 100rpx;
			background: #FFFFFF;
		}
	}



	.modal-head {
		padding: 24rpx 40rpx;
		// border: 1rpx solid #DDDDDD;
		padding-right: 0;

		.title-box {
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #000000;
		}
	}

	.modal-ctx {
		width: 100%;
		background-color: #fff;
		padding: 50rpx 32rpx;
		min-height: 100rpx;
	}











	.act-list {
		.act-item {
			line-height: 1.1;
			background: #fff;
			border: none;
			flex: 1;
			flex-direction: column;
			display: flex;
			justify-content: center;
			align-items: center;

			&::after {
				opacity: 0;
			}

			.icon-box {
				width: 48rpx;
				height: 48rpx;

				image {
					width: 48rpx;
					height: 48rpx;
				}
			}

			.title {
				margin-top: 12rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: #000000;
			}
		}
	}


	.footer-wrap {
		box-shadow: 0rpx -8rpx 20rpx 2rpx rgba(0, 0, 0, 0.06);
		padding: 20rpx;

		.safe-fixed-bottom {
			position: relative;
		}

		.btns {
			.btn {
				flex: 1;
				height: 80rpx;
				background: #F8F8F8;
				border-radius: 40rpx 40rpx 40rpx 40rpx;

				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 28rpx;
				color: #545B6A;
			}
		}
	}
</style>